package liuwanghui.dto.request;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.util.List;

@Data
public class OrderCreateDTO {
    @NotBlank(message = "收货人不能为空")
    private String receiverName;
    
    @NotBlank(message = "收货电话不能为空")
    private String receiverPhone;
    
    @NotBlank(message = "收货地址不能为空")
    private String receiverAddress;
    
    @NotEmpty(message = "订单项不能为空")
    private List<OrderItemDTO> items;
    
    private String remark;
    
    @Data
    public static class OrderItemDTO {
        @NotNull(message = "商品ID不能为空")
        private Long productId;
        
        @NotNull(message = "商品数量不能为空")
        private Integer quantity;
        
        private String remark;
    }
} 